package com.xinqi.modules.homework.homework.service;

import com.xinqi.common.base.response.PageInfo;
import com.xinqi.common.base.response.Param;
import com.xinqi.common.mybatis.data.service.BaseService;
import com.xinqi.modules.homework.homework.domain.CourseHomeworkFileEntity;
import com.xinqi.modules.homework.homework.dto.req.CourseHomeworkFileCreateDTO;
import com.xinqi.modules.homework.homework.dto.req.CourseHomeworkFileDeleteDTO;
import com.xinqi.modules.homework.homework.dto.req.CourseHomeworkFileQueryDTO;
import com.xinqi.modules.homework.homework.dto.req.CourseHomeworkFileUpdateDTO;
import com.xinqi.modules.homework.homework.dto.rsp.CourseHomeworkFileResultDTO;

import java.util.List;

/**
 * 作业提交文件记录表服务层
 *
 * @author: system
 * @date: 2023/03/08
 */
public interface CourseHomeworkFileService extends BaseService<CourseHomeworkFileEntity> {

    /**
     * 分页查询 作业提交文件记录表数据
     */
    PageInfo<CourseHomeworkFileResultDTO> page(Param pageable, CourseHomeworkFileQueryDTO query);

    /**
     * 查询 作业提交文件记录表数据
     */
    List<CourseHomeworkFileResultDTO> find(CourseHomeworkFileQueryDTO query);

    /**
     * 查询 作业提交文件记录表数据根据记录ID
     */
    List<CourseHomeworkFileResultDTO> findByRecordId(Long recordId);

    /**
     * 根据id查询 作业提交文件记录表数据
     */
    CourseHomeworkFileResultDTO findById(Long id);

    /**
     * 新增 作业提交文件记录表数据
     */
    Long insert(CourseHomeworkFileCreateDTO dto);

    /**
     * 根据id修改 作业提交文件记录表数据
     */
    Boolean updateById(CourseHomeworkFileUpdateDTO dto);

    /**
     * 批量修改 作业提交文件记录表数据
     */
    Boolean saveBatch(Long recordId, List<CourseHomeworkFileCreateDTO> list);

    /**
     * 根据id删除 作业提交文件记录表数据
     */
    Boolean deleteById(Long id);

    /**
     * 根据id删除 作业提交文件记录表数据
     */
    Boolean deleteById(CourseHomeworkFileDeleteDTO dto);

}
